package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StoreTargetOverviewMapper;
import com.ruoyi.system.domain.StoreTargetOverview;
import com.ruoyi.system.service.IStoreTargetOverviewService;

/**
 * 门店目标概览，记录各门店收入、会员等目标完成情况Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-13
 */
@Service
public class StoreTargetOverviewServiceImpl implements IStoreTargetOverviewService
{
    @Autowired
    private StoreTargetOverviewMapper storeTargetOverviewMapper;

    /**
     * 通过id查询门店目标概览
     *
     * @param id 门店目标概览，记录各门店收入、会员等目标完成情况主键
     * @return 门店目标概览，记录各门店收入、会员等目标完成情况
     */
    @Override
    public StoreTargetOverview selectStoreTargetOverviewById(Long id)
    {
        return storeTargetOverviewMapper.selectStoreTargetOverviewById(id);
    }

    /**
     * 查询门店目标概览列表
     *
     * @param  targetName,storeName 目标名称，门店名称，记录各门店收入、会员等目标完成情况
     * @return 门店目标概览，记录各门店收入、会员等目标完成情况
     */
    @Override
    public List<StoreTargetOverview> selectStoreTargetOverviewListByName(String targetName,String storeName)
    {
        return storeTargetOverviewMapper.selectStoreTargetOverviewListByName(targetName,storeName);
    }

    /**
     * 新增门店目标概览
     *
     * @param storeTargetOverview 门店目标概览，记录各门店收入、会员等目标完成情况
     * @return 结果
     */
    @Override
    public int insertStoreTargetOverview(StoreTargetOverview storeTargetOverview)
    {
        return storeTargetOverviewMapper.insertStoreTargetOverview(storeTargetOverview);
    }

    /**
     * 修改门店目标概览
     *
     * @param storeTargetOverview 门店目标概览，记录各门店收入、会员等目标完成情况
     * @return 结果
     */
    @Override
    public int updateStoreTargetOverview(StoreTargetOverview storeTargetOverview)
    {
        return storeTargetOverviewMapper.updateStoreTargetOverview(storeTargetOverview);
    }

    /**
     * 通过id批量批量删除门店目标概览信息
     *
     * @param ids 需要删除的门店目标概览，记录各门店收入、会员等目标完成情况主键
     * @return 结果
     */
    @Override
    public int deleteStoreTargetOverviewByIds(Long[] ids)
    {
        return storeTargetOverviewMapper.deleteStoreTargetOverviewByIds(ids);
    }

    /**
     * 通过id删除门店目标概览信息
     *
     * @param id 门店目标概览，记录各门店收入、会员等目标完成情况主键
     * @return 结果
     */
    @Override
    public int deleteStoreTargetOverviewById(Long id)
    {
        return storeTargetOverviewMapper.deleteStoreTargetOverviewById(id);
    }
}
